<template>
  <div style="overflow: auto; max-height: 210px">
    <el-table v-loading="loading" :data="dealBaseList" border class="nowrapTable formTable">
      <el-table-column :label="$t('序号')" align="center" width="50">
        <template slot-scope="scope">
          {{ scope.$index + 1 }}
        </template>
      </el-table-column>
      <el-table-column :label="$t('项目名称')" align="center" min-width="120">
        <template slot-scope="scope">
          {{ scope.row.dealName }}
        </template>
      </el-table-column>
      <el-table-column :label="$t('项目负责人')" align="center" min-width="120">
        <template slot-scope="scope">
          {{ scope.row.personChargeName }}
        </template>
      </el-table-column>
      <el-table-column :label="$t('项目状态')" align="center" min-width="120">
        <template slot-scope="scope">
          {{ formatDealStatus(scope.row.dealStatus) }}
        </template>
      </el-table-column>
      <el-table-column :label="$t('创建时间')" align="center" min-width="120">
        <template slot-scope="scope">
          {{ parseTime(scope.row.createTime) }}
        </template>
      </el-table-column>
      <el-table-column :label="$t('最近一次跟踪时间')" align="center" min-width="120">
        <template slot-scope="scope">
          {{ parseTime(scope.row.beforeTrackTime) }}
        </template>
      </el-table-column>
    </el-table>
    <!--
    <div slot="footer" class="dialog-footer" style="text-align: right;">
      <el-button @click="cancel">{{ $t('关闭') }}</el-button>
    </div>
    -->
  </div>
</template>

<script>

export default {
  components: {},
  data() {
    return {
      // 遮盖层
      loading: false,
      dealBaseList: [],
      dealStatusOptions: []
    }
  },
  computed: {},
  created() {
    this.getDicts('deal_status').then(response => {
      this.dealStatusOptions = response.data
    })
  },
  methods: {
    init(data) {
      this.dealBaseList = data
    },
    formatDealStatus(val) {
      return this.selectDictLabel(this.dealStatusOptions, val)
    },
    submitForm() {
    },
    cancel() {
      this.$parent.$parent.boundCompanyForm = false
    },
    isNotEmpty(val) {
      return !(val === undefined || val === null || val === '')
    }

  }
}
</script>

<style scoped>
</style>
